import time

from selenium.webdriver.common.by import By as by
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as ec
from selenium import webdriver
driver = webdriver.Chrome()
driver.get('https://www.baidu.com')

kw = WebDriverWait(driver,5,1).until(ec.presence_of_element_located((by.ID,'kw')),message='sss')
print(kw)